# Compiler flags
CC=g++

# Class name
CLASS=cse410

# Project name
PROJ=project1

# MSU aPID
aPID=riggleza

# OBJ Files...
OBJ=$(patsubst %.cpp,%.o,$(wildcard *.cpp))

# Output File...
OUTPUT_FILE = myShell
	
all: doEcho $(OBJ)
	$(CC) *.o $(FLAGS) -o $(OUTPUT_FILE)

doEcho:
	@echo ---------------------------------------------
	@echo Making for target... $(MACHTYPE)
	@echo Output file is $(OUTPUT_FILE)
	@echo ---------------------------------------------

clean:
	rm -f *.o $(OUTPUT_FILE) $(CLASS)-$(PROJ)-$(aPID)*.tar.gz
	
dist: clean
	tar -cvzf $(CLASS)-$(PROJECT)-$(aPID).tar.gz *
	
dist-final: clean
	astyle --style=kr *.cpp *.h
	rm -f *.orig
	tar -cvzf $(CLASS)-$(PROJ)-$(aPID).final.tar.gz *
	
%.o: %.cpp
	$(CC) $(FLAGS) -c $*.cpp